﻿@using PartyCraftServer;
@using PartyCraftServer.Web;
@if (@Model.GetUser() != null)
{
    Model.Redirect("/home");
}
<!doctype html>
<html>
<head>
    <title>@PartyCraft.CurrentServer.MotD</title>
    <link rel="stylesheet" type="text/css" href="/css/login.css" />
</head>
<body>    
    <div id="wrap-center"></div>
    <div id="login-area">
        <img id="logo" src="/images/partycraft-small.png" alt="logo" />
        <a href="http://partycraft.codeplex.com" class="h1-link"><h1>PartyCraft</h1></a>
        <p class="light version">Version @PartyCraft.Version.ToString()</p>
        <div id="login-box">
            <img alt="login" class="float-right" src="/images/login-small.png" />
            <p class="float-right medium">Login</p>
            <form action="/login" method="post">
                <label for="username">Username:</label>
                <input class="text-box" id="username" type="text" name="username" />
                <label for="password">Password:</label>
                <input class="text-box" id="password" type="password" name="password" />
                @if (@Model.Query["fail"] != null)
                {
                    <p class="red big">Login Failed</p>
                }
                @if (@PartyCraft.Settings.GetBoolean("server.debugenabled") == true)
                {
                    <p><strong>Demo Username:</strong> TestUser</p>
                    <p><strong>Demo Password:</strong> password</p>
                    <p class="italic">To disable the test account, set server.debugenabled to false</p>
                }
                <input class="button" type="submit" value="Login" />
            </form>
        </div>
    </div>
</body>
</html>
